package week1;

public class TicketMaker {

    private TicketMaker() {
    }

    private static TicketMaker ticketMaker = null;
    private int ticketNumber = 1000;

    public static TicketMaker getInstance() {
        if (ticketMaker == null) {
            ticketMaker = new TicketMaker();
        }
//        else{
//            ticketMaker = TicketMaker.getInstance();
//        }
        return ticketMaker;
    }

    public int getNextTicketNumber() {
        return ticketNumber++;
    }
}